import java.util.Scanner;

/**
 * ClassName: UserInterface
 * Package: PACKAGE_NAME
 * Description:
 *
 * @Author harkjeans
 * @Create 2025/8/31 19:41
 * @Version 1.0
 */
public class UserInterface {
    public static void main(String[] args) {
        User u1 = new User();
        u1.name = "Tom";
        u1.password = "abc123";

        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入用户名：");
        String name = scanner.next();
        System.out.print("请输入密码：");
        String pwd = scanner.next();

//        u1.login(name, pwd);

        boolean slogan = u1.login1(name, pwd);
        if(slogan){
            System.out.println("登陆成功：欢迎您" + u1.name);
        }else{
            System.out.println("登陆失败：用户名或密码错误");
        }


    }
}
